/*
 *    Copyright (c) 2018-2025, cloud All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: cloud
 */

package com.fuyao.cloud.message.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 消息管理
 *
 * @author liyue
 * @date 2022-04-22 17:27:38
 */
@Data
@TableName("fy_message_management")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "消息管理")
public class MessageManagement extends Model<MessageManagement> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键Id
     */
    @TableId
    @ApiModelProperty(value = "主键Id")
    private Long id;

    /**
     * 租户ID
     */
    @ApiModelProperty(value = "租户ID")
    private Long tenantId;

    /**
     * 单位、部门ID
     */
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "单位、部门ID")
    private Long deptId;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "部门全名称")
    private String deptFullname;

    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建人")
    private String createBy;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建人ID")
    private Long createId;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    /**
     * 修改人
     */
    @TableField(fill = FieldFill.UPDATE)
    @ApiModelProperty(value = "修改人")
    private String updateBy;

    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.UPDATE)
    @ApiModelProperty(value = "修改时间")
    private LocalDateTime updateTime;

    /**
     * 删除标记,1:已删除,0:正常
     */
    @TableLogic
    @ApiModelProperty(value = "删除标记,1:已删除,0:正常")
    private String delFlag;

    /**
     * 唯一编码（用于关联附件）
     */
    @ApiModelProperty(value = "唯一编码（用于关联附件）")
    private String unid;

    /**
     * 标题
     */
    @TableField(value = "subject", condition = SqlCondition.LIKE)
    @ApiModelProperty(value = "标题")
    private String subject;

    /**
     * 文档类型
     */
    @ApiModelProperty(value = "文档类型")
    private String doctype;

    /**
     * 文档ID
     */
    @ApiModelProperty(value = "文档ID")
    private Long sourceid;

    /**
     * 分类ID
     */
    @ApiModelProperty(value = "分类ID")
    private Long ctiId;

    /**
     * 分类名称
     */
    @ApiModelProperty(value = "分类名称")
    private String ctiName;

    /**
     * 分类全名称
     */
    @ApiModelProperty(value = "分类全名称")
    private String ctiFullname;

    /**
     * 分类全编码
     */
    @ApiModelProperty(value = "分类全编码")
    private String ctiFullcode;

    /**
     * 状态默认为0{0：启用、1：禁用}
     */
    @ApiModelProperty(value = "状态默认为0{0：启用、1：禁用}")
    private Integer status;

    /**
     * 消息描述
     */
    @ApiModelProperty(value = "消息描述")
    private String infor;

    /**
     * 打开超链接
     */
    @ApiModelProperty(value = "打开超链接")
    private String openUrl;

    /**
     * 打开超链接类型
     */
    @ApiModelProperty(value = "打开类型（N:内部跳转，Y:外部跳转。 ）")
    private String openType;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remarks;

    /**
     * 完成时限0：长期坚持；1：周期完成。如果是周期完成就必须填写开始结束时间
     */
    @ApiModelProperty(value = "完成时限0：长期坚持；1：周期完成。如果是周期完成就必须填写开始结束时间")
    private String timelimitType;

    /**
     * 开始时间（精确到天）
     */
    @ApiModelProperty(value = "开始时间（精确到天）")
    private LocalDate startdate;

    /**
     * 结束时间（精确到天）
     */
    @ApiModelProperty(value = "结束时间（精确到天）")
    private LocalDate enddate;

    /**
     * 0，1，2 短信，系统消息，邮件
     * 提醒方式(支持多选格式如0,0,0；代表短信、系统消息、邮件。1代表需要，0代表不需要中)
     */
    @ApiModelProperty(value = "提醒方式(支持多选格式如0,0,0；代表短信、系统消息、邮件。1代表需要，0代表不需要中)")
    private String mode;
}
